package main.java.rock.concurrent;

import sun.misc.Unsafe;

public class ReentrantLockTianjia {

    //state=0 空闲状态,state>0有人获取到锁
    private static volatile int state = 0;
    private static   Unsafe unsafe = Unsafe.getUnsafe();



    public  static void lock(int i){

    }
    public  static void unLock(int i){

        state = 0;
        System.out.println("释放锁 i = " + i);
        return;
    }
}
